package org.springblade.modules.ehb.service.impl;

import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.modules.ehb.mapper.EhbDictMapper;
import org.springblade.modules.ehb.mapper.EhbLabelMapper;
import org.springblade.modules.ehb.service.IEhbDictService;
import org.springblade.modules.ehb.vo.EhbDictVO;
import org.springblade.modules.system.entity.DictType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class EhbDictServiceImpl extends BaseServiceImpl<EhbDictMapper, DictType> implements IEhbDictService {

	@Autowired
	protected EhbLabelMapper baseLabelMapper;

	@Override
	public EhbDictVO getDictByType(String type) {
		EhbDictVO dictByType = baseMapper.getDictByType(type);
		if (dictByType == null) {
			dictByType = baseLabelMapper.getDictByType(type);
		}
		return dictByType;
	}
}
